package com.lei.dao;

import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;

import com.lei.bean.User;

public class UserDao {
	
	@SuppressWarnings("deprecation")
	private SimpleJdbcTemplate jdbcTemplate;

	public void setJdbcTemplate(SimpleJdbcTemplate jdbcTemplate) {
		this.jdbcTemplate = jdbcTemplate;
	}
	
	public void save(User user){
		String sql="insert into t_user(username,role,password) values(?,?,?);";
		jdbcTemplate.update(sql, user.getUsername(),user.getRole(),user.getPassword());
	}
	

}
